Memory access violation, including array overflow or overrun, illegal pointer operation and free of address information of wrong memory block etc., is one of most easily occurred, most harmful, and most difficult problems in the software development process.
At present, commonly used tools for checking the validity of memory access based on a C/C++ environment mainly include an instrumentation-based memory checking tool and a dynamic binary analysis tool.
The checking method of the instrumentation-based memory checking tool includes: when compiling a C/C++ source document, inserting monitoring function instrumentation at memory allocation and access points, and identifying whether the current memory access is valid according to address information of a memory block to be accessed and the range of the current access.
When checking the memory access of large-scale software, massive memory information, mutually exclusive global resource and data of maintenance tools are required to be searched by the instrumentation-based memory checking tool, therefore, the checking performance of the validity of memory access is very low. The memory access of common software is very frequent, and the performance of the program is greatly affected in validity checking of each access, which makes it impossible for the instrumentation-based memory checking tool to be applied to commercial grade software.